import {get,post} from "./http"
//登录
export const reqLogin=(user)=>post("/api/login",user)

//注册
export const reqRegister=user=>post("/api/register",user)

//分类
export const reqHomeCate=()=>get("/api/getCate")

//列表
export const reqList=(params)=>get("/api/getgoodlist",params)

//详情
export const reqDetail=params=>get("/api/getgoodsinfo",params)
//搜索
export const reqSearch=params=>get("/api/search",params)

//二级分类
export const reqCate=params=>get("/api/getcates",params)

//轮播图
export const reqBanner=()=>get("/api/getbanner")

//首页商品
export const reqHomeGoods = () => get("/api/gethortgoods")

//购物车添加
export const reqAdd = (params) => post("/api/cartadd", params)

//购物车list
export const reqShopList = params => get("/api/cartlist", params)

//购物车删除
export const reqShopDel = params => post("/api/cartdelete", params)

//购物车修改
export const reqShopEdit = params => post("/api/cartedit", params)
//地址list
export const reqAddressList=params=>get("/api/addresslist",params)

//地址添加
export const reqAddressAdd=params=>post("/api/addressadd",params)

//地址编辑
export const reqAddressEdit=params=>post("/api/addressedit",params)

//订单生成
export const reqOrderAdd=params=>post("/api/orderadd",params)